﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="Faust.Andrew.MTG.Player.TargetPlayerDialog"
	x:Name="Window"
	Title="Select a Target Player" Background="{DynamicResource WindowBackground}" Padding="5" mc:Ignorable="d" Topmost="True" Icon="MTGManagerIcon.ico" SizeToContent="WidthAndHeight">

	<Window.Resources>
		<DataTemplate x:Key="PlayerItemTemplate">
			<Grid>
				<Label Margin="0,0,-0.001,0" Content="{Binding Name, Mode=OneWay}" d:LayoutOverrides="Width, Height" Foreground="White"/>
			</Grid>
		</DataTemplate>
	</Window.Resources>
	<StackPanel x:Name="LayoutRoot" Margin="5">
		<Grid Margin="0,0,0,5" Visibility="{Binding RandomCards, Converter={StaticResource VisibleIfTrue}, ElementName=Window, Mode=OneWay}">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>
			<Label Margin="0,0,10,0" Content="Zone" Foreground="White"/>
			<ComboBox x:Name="cbZone" Margin="0,0,0,10" Grid.Column="1" MinWidth="100"/>
			<Label Margin="0,0,10,0" Content="Count" Grid.Row="1" Foreground="White"/>
			<TextBox x:Name="txtCount" Margin="0" Grid.Column="1" Text="1" TextWrapping="Wrap" Grid.Row="1"/>
		</Grid>
		<ListBox x:Name="lbTarget" Background="{x:Null}" ItemTemplate="{DynamicResource PlayerItemTemplate}" ItemsSource="{Binding Presenter.Model.Players, ElementName=Window, Mode=Default}" SelectionMode="Multiple" Foreground="White" MinHeight="200" MinWidth="400" Visibility="{Binding SelectTargets, Converter={StaticResource VisibleIfTrue}, ElementName=Window, Mode=Default}"/>
		<StackPanel HorizontalAlignment="Right" Margin="0,5,0,0" Orientation="Horizontal">
			<Button x:Name="btnCancel" Margin="0,0,10,0" Width="75" Content="Cancel" IsCancel="True" Click="btnCancel_Click"/>
			<Button x:Name="btnOK" Width="75" Content="OK" IsDefault="True" Click="btnOK_Click"/>
		</StackPanel>
	</StackPanel>
</Window>